home *** CD-ROM | disk | FTP | other *** search
/ Aminet 51 / Aminet 51 (2002)(GTI - Schatztruhe)[!][Oct 2002].iso / Aminet / util / arc / xadmasterdev.lha / xad / Sources / Include / SDI_compiler.h < prev    next >
Encoding:
C/C++ Source or Header  |  2002-08-20  |  2.5 KB  |  125 lines

  1. #ifndef SDI_COMPILER_H
  2. #define SDI_COMPILER_H
  3.  
  4. /* Includeheader
  5.  
  6.     Name:           SDI_compiler.h
  7.     Versionstring:    $VER: SDI_compiler.h 1.7 (16.06.2002)
  8.     Author:         SDI
  9.     Distribution:   PD
  10.     Description:    defines to hide compiler stuff
  11.  
  12.  1.1   25.06.98 : created from data made by Gunter Nikl
  13.  1.2   17.11.99 : added VBCC
  14.  1.3   29.02.00 : fixed VBCC REG define
  15.  1.4   30.03.00 : fixed SAVEDS for VBCC
  16.  1.5   29.07.00 : added #undef statements (needed e.g. for AmiTCP together with vbcc)
  17.  1.6   19.05.01 : added STACKEXT and Dice stuff
  18.  1.7   16.06.01 : added MorphOS specials and VARARGS68K
  19. */
  20.  
  21. #ifdef ASM
  22. #undef ASM
  23. #endif
  24. #ifdef REG
  25. #undef REG
  26. #endif
  27. #ifdef LREG
  28. #undef LREG
  29. #endif
  30. #ifdef CONST
  31. #undef CONST
  32. #endif
  33. #ifdef SAVEDS
  34. #undef SAVEDS
  35. #endif
  36. #ifdef INLINE
  37. #undef INLINE
  38. #endif
  39. #ifdef REGARGS
  40. #undef REGARGS
  41. #endif
  42. #ifdef STDARGS
  43. #undef STDARGS
  44. #endif
  45.  
  46. /* first "exceptions" */
  47.  
  48. #if defined(__MAXON__)
  49.   #define STDARGS
  50.   #define STACKEXT
  51.   #define REGARGS
  52.   #define SAVEDS
  53.   #define INLINE inline
  54. #elif defined(__VBCC__)
  55.   #define STDARGS
  56.   #define STACKEXT
  57.   #define REGARGS
  58.   #define INLINE
  59.   #define REG(reg,arg) __reg(#reg) arg
  60. #elif defined(__STORM__)
  61.   #define STDARGS
  62.   #define STACKEXT
  63.   #define REGARGS
  64.   #define INLINE inline
  65. #elif defined(__SASC)
  66.   #define ASM(arg) arg __asm
  67. #elif defined(__GNUC__)
  68.   #define REG(reg,arg) arg __asm(#reg)
  69.   #define LREG(reg,arg) register REG(reg,arg)
  70.  
  71.   /*
  72.   ** Don`t use __stackext for the MorphOS version
  73.   ** because we anyway don`t have a libnix ppc with stackext
  74.   ** Also we define a VARARGS68K define here to specify
  75.   ** functions that should work with that special attribute
  76.   ** of the MOS gcc compiler for varargs68k handling.
  77.   */
  78.   #if defined(__MORPHOS__)
  79.     #define STDARGS
  80.     #define STACKEXT
  81.     #define VARARGS68K  __attribute__((varargs68k))
  82.   #endif
  83.  
  84. #elif defined(_DCC)
  85.   #define REG(reg,arg) __ ## reg arg
  86.   #define STACKEXT __stkcheck
  87.   #define STDARGS __stkargs
  88.   #define INLINE static
  89. #endif
  90.  
  91. /* then "common" ones */
  92.  
  93. #if !defined(ASM)
  94.   #define ASM(arg) arg
  95. #endif
  96. #if !defined(REG)
  97.   #define REG(reg,arg) register __##reg arg
  98. #endif
  99. #if !defined(LREG)
  100.   #define LREG(reg,arg) register arg
  101. #endif
  102. #if !defined(CONST)
  103.   #define CONST const
  104. #endif
  105. #if !defined(SAVEDS)
  106.   #define SAVEDS __saveds
  107. #endif
  108. #if !defined(INLINE)
  109.   #define INLINE static __inline
  110. #endif
  111. #if !defined(REGARGS)
  112.   #define REGARGS __regargs
  113. #endif
  114. #if !defined(STDARGS)
  115.   #define STDARGS __stdargs
  116. #endif
  117. #if !defined(STACKEXT)
  118.   #define STACKEXT __stackext
  119. #endif
  120. #if !defined(VARARGS68K)
  121.   #define VARARGS68K
  122. #endif
  123.  
  124. #endif /* SDI_COMPILER_H */
  125.